﻿<UserControl
    x:Class="XamlInspector.Presentation.InspectorWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:presentation="using:XamlInspector.Presentation"
    xmlns:controls="using:XamlInspector.Presentation.Controls"
    RequestedTheme="Light"
    mc:Ignorable="d">
    <Border Background="White">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <presentation:VisualTreeControl x:Name="tree" TreeModel="{Binding VisualTree}" SelectedElement="{Binding SelectedElement, Mode=TwoWay}" Margin="0,1,4,0" />
            <controls:GridSplitter Grid.Column="0" Width="4" HorizontalAlignment="Right" VerticalAlignment="Stretch" />
            <controls:TabControl Grid.Column="1" >
                <controls:TabPage Header="Properties">
                    <presentation:PropertiesControl DataContext="{Binding PropertiesViewModel}" Properties="{Binding Properties}"/>
                </controls:TabPage>
                <controls:TabPage Header="Data Context">
                    <presentation:PropertiesControl DataContext="{Binding DataContextViewModel}" Properties="{Binding Properties}"/>
                </controls:TabPage>
                <controls:TabPage Header="Ressources">
                    <presentation:ResourceControl Element="{Binding SelectedElement, ElementName=tree}" />
                </controls:TabPage>
                <controls:TabPage Header="Events">
                    <presentation:EventControl DataContext="{Binding EventViewModel}" />
                </controls:TabPage>
            </controls:TabControl>
            
        </Grid>
    </Border>
</UserControl>
